///*dataSource {
//    pooled = true
//    dbCreate = "create-drop"
//    url = "jdbc:mysql://localhost/madmin"
//    driverClassName = "com.mysql.jdbc.Driver"
//    dialect = org.hibernate.dialect.MySQLDialect
//    username = "madmin"
//    password = "madmin"
//}*/
hibernate {
	cache.use_second_level_cache = true
	cache.use_query_cache = true
	cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
// environment specific settings
environments {
	development {
		dataSource {
			// one of 'create', 'create-drop', 'update', 'validate', ''
			dbCreate = "create-drop"
			url = "jdbc:mysql://localhost/union"
			//url = "jdbc:mysql://192.168.1.10/ricamix_homologacao"
			username = "root"
			password = "1234"
		}
	}
	test {
		dataSource {
			url = "jdbc:mysql://localhost/ricamix_homolog"
			username = "ricamix_homolog"
			password = "ricamix_homolog***"
			pooled = true
			properties {
				maxActive = -1
				minEvictableIdleTimeMillis=1800000
				timeBetweenEvictionRunsMillis=1800000
				numTestsPerEvictionRun=3
				testOnBorrow=true
				testWhileIdle=true
				testOnReturn=true
				validationQuery="SELECT 1"
			}
		}
	}
	production {
		//        dataSource {
		//			jndiName = "java:comp/env/ricamix"
		//        }
		dataSource {
//			dbCreate = "update"
			url = "jdbc:mysql://localhost/ricamix_prd"
			username = "ricamix_prd"
			password = "ricamix_prd!@#"
			pooled = true
			properties {
				maxActive = -1
				minEvictableIdleTimeMillis=1800000
				timeBetweenEvictionRunsMillis=1800000
				numTestsPerEvictionRun=3
				testOnBorrow=true
				testWhileIdle=true
				testOnReturn=true
				validationQuery="SELECT 1"
			}
		}
	}
}
